package cn.bugstack.mybatis.transaction;

import java.sql.Connection;
import java.sql.SQLException;

/**
 * description: 事物接口 
 * taskId：
 * <pre>
 * change history:
 * date             defect#             person                comments
 * ---------------------------------------------------------------------
 * 2024/11/27       ********         zhaochaoyue        create file
 * </pre>
 *
 * @author: zhaochaoyue
 * @date: 2024/11/27 15:04
 * @copyright: 2024
 */
public interface Transaction {
    
    //获取连接
    Connection getConnection() throws SQLException;
    
    //提交
    void commit() throws SQLException;
    //回滚
    void rollback() throws SQLException;
    //关闭
    void close() throws SQLException;
}
